package com.atguigu.structure.composite;

public class University extends EduComponent{


    public University(String name) {
        super(name);
    }

    @Override
    protected void add(EduComponent component) {
        super.children.add(component);

    }

    @Override
    protected void remove(EduComponent component) {
        super.children.remove(component);
    }

    @Override
    protected void print() {
        System.out.println("-"+name);
        for (EduComponent child : children) {
            child.print();
        }

    }
}
